package com.ssm.entity;

public enum TypeNameEnum {

    image("图片(image)"),
    music("音乐(music)"),
    video("视频(video)"),
    zip("压缩包(zip)"),
    word("文档(word)"),
    bt("种子(bt)"),
    other("其他(other)");

    private String text;
    TypeNameEnum(String text){
        this.text = text;
    }
    public String getText(){
        return this.text;
    }

    public static String getValue(String key){
        for(TypeNameEnum t:TypeNameEnum.values()) {
            if(key.equals(t.toString())){
                return t.getText();
            }
        }
        return key;
    }
}
